package com.endurance.clients;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @ProjectName: spring-cloud-hoxton-parent
 * @Package: com.endurance.clients
 * @ClassName: DemosClient
 * @Description:
 * @Author: sunlin
 * @CreateDate: 2024/02/07 10:43
 * @Version: 1.0
 */

 // fallback 代表当前服务调用， HYSTRIX服务时， 调用失败的备选方案， fallback需要指定一个类
@FeignClient(value = "HYSTRIX", fallback = DemosClientFallBack.class)
public interface DemosClient {

    @GetMapping("/demos/demos")
    String demos();

}
